//
//  Common.swift
//  高仿新浪微博
//
//  Created by 沈腾飞 on 2017/1/17.
//  Copyright © 2017年 shen. All rights reserved.
//

import UIKit


/*
 - 相当于OC中的pch 文件
 */

// 屏幕的宽度和高度
let STFSCREENW = UIScreen.main.bounds.width
let STFSCREENH = UIScreen.main.bounds.height
// 微博的主题颜色
let STFThemeColor = UIColor.orange

// RGB颜色
func RGB(r:Float, g: Float, b: Float, alpha: Float = 1) -> UIColor {
    return UIColor(colorLiteralRed: r/Float(255), green: g/Float(255), blue: b/Float(255), alpha: alpha)
}
// 随机颜色
func STFRandomColor() -> UIColor{
    let r =  Float(arc4random()%256)
    let g =  Float(arc4random()%256)
    let b =  Float(arc4random()%256)
    return RGB(r: r, g: g, b: b)
}


// 新浪微博需要的信息
let APPKEY = "3410294261"
let APPSECRET = "dd4f98fd2d23040410dac21d6c046b36"
let REDIRECT_URI = "http://www.baidu.com"
//let APPKEY = "4224473119"
//let APPSECRET = "dfe5a2b2eec6368b1ff6d86362bf09e7"
// 微博账号和密码
let STFWBNAME = "rangyuan05788697@163.com"
let STFWBPASSWD = "bbb333"

// 通知需要的名称
// 切换根控制器的通知名字
let SWITCHROOTVIEWCONTROLLERNOTI = "SWITCHROOTVIEWCONTROLLERNOTI"


